package com.tjrac.generalpermissions.domain;

import java.util.List;

/**
 * 权限类型
 *
 * @author ZeNing
 * @create 2020-11-22 15:36
 */
public class PType {

    private Integer id;     //分组id  主键 自增
    private String name;    //权限分组名 非空
    private String desc;    //权限分组描述
    List<Permission> permissions; //该类型的所有权限

    public PType() {
    }

    public PType(Integer id) {
        this.id = id;
    }

    public PType(String name, String desc, List<Permission> permissions) {
        this.name = name;
        this.desc = desc;
        this.permissions = permissions;
    }

    public PType(Integer id, String name, String desc, List<Permission> permissions) {
        this.id = id;
        this.name = name;
        this.desc = desc;
        this.permissions = permissions;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public List<Permission> getPermissions() {
        return permissions;
    }

    public void setPermissions(List<Permission> permissions) {
        this.permissions = permissions;
    }

    @Override
    public String toString() {
        return "PType{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", desc='" + desc + '\'' +
                ", permissions=" + permissions +
                '}';
    }
}
